package com.chenjt.minio.file.config;

import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 注释：
 *
 * @author chenjt
 * @date 2021/11/6 10:06
 */
@Configuration
public class MinioConf {


    @Autowired
    private MinioProp minioProp;


    @Bean
    public MinioClient chuanboPictureMinioClient(){
        MinioClient minioClient =
                MinioClient.builder()
                        .endpoint(minioProp.getEndpoint())
                        .credentials(minioProp.getAccessKey(), minioProp.getSecretKey())
                        .build();

        return minioClient;
    }





}
